package game.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import common.model.po.GBuilding;
import common.model.request.base.PaginationRequest;
import common.model.response.base.Result;
import game.model.request.SaveBuildingRequest;
import game.model.request.SearchBuildingRequest;
import game.model.vo.BuildingDetailVo;
import game.model.vo.SearchBuildingVo;

/**
 * 建筑（包括生产机器、物流、照明、墙壁等）服务类
 *
 * @author 米泽鹏
 * @since 2022-02-26
 */
public interface GBuildingService extends IService<GBuilding> {

	/**
	 * 建筑分页查询
	 *
	 * @param paginationRequest PaginationRequest<SearchBuildingRequest, GBuilding>
	 * @return Page<SearchBuildingVo>
	 */
	Page<SearchBuildingVo> searchBuildingByPage(PaginationRequest<SearchBuildingRequest, GBuilding> paginationRequest);

	/**
	 * 单个建筑查询
	 *
	 * @param buildingId 建筑id
	 * @return BuildingDetailResponse
	 */
	BuildingDetailVo getBuildingDetailById(Long buildingId);

	/**
	 * 建筑新增或更新
	 *
	 * @param request SaveItemRequest
	 * @return Result
	 */
	Result<?> saveBuilding(SaveBuildingRequest request);

	/**
	 * 建筑删除
	 *
	 * @param id Long
	 * @return Result
	 */
	Result<?> deleteBuilding(Long id);

}
